package com.example.flashsales.mappers;

import com.example.flashsales.entity.dto.StockDetailsDto;
import com.example.flashsales.entity.dto.StockDto;
import com.example.flashsales.entity.pojo.StockRecord;
import com.example.flashsales.entity.pojo.StockRecordDetails;
import com.example.flashsales.entity.vo.StockDetailsVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface StockMapper {

    //增加一条进货纪录
    int addStockRecord(StockDto stockDto);

    //增加一条进货细节
    int addStockRecordDetails(StockDetailsDto stockDetailsDto);

    //查看所有
    List<StockRecord> viewAllStock(@Param("num") int num, @Param("page") int page, @Param("qDate") Date qDate, @Param("hDate") Date hDate);

    //查看你细节
    List<StockDetailsVo> viewDetails(@Param("stockId") long id);

    //查看数量
    Integer viewCount();

}
